<?php
class AppConfig extends BaseAppConfig
{
    public $URL_ADMIN;
    public $URL_LOGIN;
    public $URL_CUSTOMER_LOGIN;
    public $URL_INSTALL;

    public $DEFAULT_PROFILE_PHOTO = 'silhouette.gif';

    protected static $instance;

    public static function GetInstance()
    {
        return self::$instance ? self::$instance : self::$instance = new AppConfig();
    }

    public function AppConfig()
    {
        parent::__construct();

        $this->URL_DEFAULT = $this->URL;
        $this->URL_ADMIN = $this->URL.FS.'admin';
        $this->URL_LOGIN = $this->URL.FS.'login';
        $this->URL_CUSTOMER_LOGIN = $this->URL.FS.'login';
        $this->URL_INSTALL = $this->URL.FS.'cms-install';

        $this->AddReplaceValue('url_admin', $this->URL_ADMIN);

        $this->DOMAIN_ALIAS = array(
            'localhost' => 'sample.com',
        );

        $this->URL_ROUTES = array(
            'sample.com/posts/?$' => 'sample.com/posts?tag=$1',
            'sample.com/post/?$'  => 'sample.com/post?post_id=$1',
        );
    }

    public function GetUserModel()
    {
        return CmsUserModel::GetInstance();
    }
}
?>
